#!/bin/bash

PRV_CERT=/etc/ssl/servercerts/serverkey.pem
PUB_CERT=/etc/ssl/servercerts/servercert.pem

openssl genrsa 1024 > $PRV_CERT
openssl req -new -x509 -nodes -sha1 -days 3650 -key $PRV_CERT -subj '/C=CN/ST=Beijing/L=ChaoYang/O=CHP/OU=OSLO/CN='`hostname`  > $PUB_CERT

openssl x509 -text -in $PUB_CERT

